import { trim } from 'lodash';

export function getAttrs(xml) {
  let attributes = {};
  [...xml.attributes].forEach(item => {
    attributes[item.name] = item.value.split(' ').filter(item => trim(item)).map(item => trim(item));
  })
  return attributes;
}